import request from '@/utils/request'
import defaultSettings from '@/settings'

// 列表
export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.authorityApp}/s/onlineInfo/search`,
  exportUrl: `${defaultSettings.ctx.authorityApp}/s/onlineInfo/search`,
  delUrl: `${defaultSettings.ctx.authorityApp}/s/onlineInfo/forceLogout`,
}

// 查询登录日志列表
export function listOnLineInfo(query) {
  return request({
    url: `${defaultSettings.ctx.authorityApp}/s/onlineInfo/search`,
    method: 'get',
    params: query
  })
}

// 强退
export function forceLogout(ids) {
  return request({
    url: `${defaultSettings.ctx.authorityApp}/s/onlineInfo/forceLogout?id=${ids}`,
    method: 'post',
  })
}
